{% extends 'layout.html' %}
{% block maincontent%}
    <h2> 添加诗人</h2>
    <form action="" method="post">
        <!-- django中防止csrf攻击的方式 -->
        {% csrf_token %}

        <div class="form-group">
            <input class='form-control' type="text" name="name" placeholder="请输入诗人姓名">
        </div>
        <div class='form-group'>
            <!-- <input class='form-control' type="text" name="sex" placeholder='请输入性别'> -->
            <select name="sex" class="form-control" >
                {% for sex in sex_options %}
                <option value="{{sex.0}}"> {{sex.1}} </option>
                {% endfor %}
            </select>
        </div>
        <div class='form-group'>
            <input class='form-control' type="text" name="dynasty" placeholder='请输入朝代'>
        </div>
        <div class='form-group'>
            <input class='btn btn-primary' type="submit" value='添加诗人'>
        </div>
    </form>
{% endblock %}